<HTML><HEAD><TITLE>minimum(?SetVariable, ?Min)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(cardinal)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>minimum(?SetVariable, ?Min)</H1>
Minimum of a set of integers
<DL>
<DT><EM>SetVariable</EM></DT>
<DD>A Set (variable or ground) of integers.
</DD>
<DT><EM>Min</EM></DT>
<DD>An integer or an FD variable.
</DD>
</DL>
<H2>Description</H2>
Min is the minimum (i.e. the lowest element) of SetVariable.<P>
		If Min is given (as an integer or FD variable) then SetVariable is
		constrained to have such minimum.
		If Min is a free variable, then it is unified with the set's minimum as
		an FD variable or an integer (if it is already known).<P>
		minimum/2 can thus be used either to declare (or constrain) a minimum
		function or to retrieve it.
<H3>Fail Conditions</H3>
Fails if Min can not be the minimum of SetVariable.
<H3>Resatisfiable</H3>
No.
<H2>Examples</H2>
<PRE>
?- S`::[]..[1,2], minimum(S,M).
?- set(S,[],[1,2],[minimum:1], minimum(S,M).
M = 1

?- S`::[]+[1,2], minimum(S,2).
S = [2]

?- set(S,[],[1,2],[minimum:2], minimum(S,M).
S = [2]
M = 2</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/cardinal/maximum-2.html">maximum / 2</A>, <A HREF="../../lib_public/cardinal/set-4.html">set / 4</A>, <A HREF="../../lib_public/cardinal/sets-4.html">sets / 4</A>, <A HREF="../../lib_public/cardinal/cardinality-2.html">cardinality / 2</A>
</BODY></HTML>
